package com.zenith.yasoo.setup;

import java.io.Serializable;

import javax.persistence.Embeddable;

@Embeddable
public class UomUomKey implements Serializable {
	private static final long serialVersionUID = 1L;
	public String uomId;
	public String uomToId;

	public UomUomKey() {
	}

	public UomUomKey(String uomId, String uomToId) {
		this.uomId = uomId;
		this.uomToId = uomToId;
	}

	public boolean equals(Object otherOb) {
		if (this == otherOb) {
			return true;
		}
		if (!(otherOb instanceof UomUomKey)) {
			return false;
		}
		UomUomKey other = (UomUomKey) otherOb;
		return ((uomId == null ? other.uomId == null : uomId
				.equals(other.uomId)) && (uomToId == other.uomToId));
	}

	public int hashCode() {
		return ((uomId == null ? 0 : uomId.hashCode()) ^ ((uomToId == null ? 0
				: uomToId.hashCode())));
	}

	public String toString() {
		return "" + uomId + "-" + uomToId;
	}

}
